home *** CD-ROM | disk | FTP | other *** search
/ Amiga Collections: Camelot / Camelot 078 (1990-06)(Swedish User Group of Amiga)(SE)(PD)[WB].zip / Camelot 078 (1990-06)(Swedish User Group of Amiga)(SE)(PD)[WB].adf / TrackSalve / TrackSalve / Source / explain.a < prev    next >
Text File  |  1990-06-17  |  3KB  |  82 lines

  1. *
  2. *  explain.a  -     Copyright 1990 D.W.Reisig
  3. *
  4. *   #     date     by    Comment
  5. *  -- --------- ----- ---------------------
  6. *   0 29-Oct-89     DWR   Created for Tracksalve
  7. *   1 10-Apr-90     DWR   TrackSalve 1.3, more switches
  8. *
  9. *  Program cmdline help
  10. *
  11.  
  12. *        nolist
  13.         ifnd    IFILES
  14. IFILES        set    1
  15.         INCLUDE "exec/types.i"
  16.         INCLUDE "libraries/dos.i"
  17.         INCLUDE "libraries/dos_lib.i"
  18.         INCLUDE "call.i"
  19.         endc
  20. *        list
  21.  
  22.  
  23. NEWLINE        EQU    $0a
  24.  
  25.         CSECT    text,0,0,1,2
  26.  
  27.         XREF    _ConOut,_DOSBase,_Pr
  28.  
  29.         Func    _Explain
  30.         lea.l    ExplMsg1(pc),a0            Load introducer
  31.         bsr.s    ConMsg                Print
  32.         move.l    _Pr(a4),a0            Load programname from cmdline
  33.         bsr.s    ConMsg                Print
  34.         lea.l    ExplMsg2(pc),a0            Rest of the explain text
  35.  
  36.         Func    ConMsg,@ConMsg            Print (a0) to the console (Not stdout)
  37.         movem.l d2/d3/a6,-(a7)
  38.         move.l    a0,d2                String
  39.         beq.s    ConMsgRtn            No string..
  40.         moveq.l #-1,d3                Init length parameter
  41. 10$        addq.l    #1,d3                Counter
  42.         tst.b    (a0)+                String terminator?
  43.         bne.s    10$                No..
  44.         move.l    _ConOut(a4),d1            Console file handle
  45.         move.l    _DOSBase(a4),a6
  46.         jsr    _LVOWrite(a6)
  47. ConMsgRtn    movem.l (a7)+,d2/d3/a6
  48.         rts
  49.  
  50.  
  51. ExplMsg1
  52.   dc.b 'Syntax:   ',0
  53. ExplMsg2
  54.   dc.b ' {[!]<unit>|a {<unit>} {<Command>}}',NEWLINE
  55.   dc.b 'Function: Modify a Trackdisk device unit addressed by its unit number',NEWLINE
  56.   dc.b ' <no args>         Show present status',NEWLINE
  57.   dc.b 'Units:',NEWLINE
  58.   dc.b ' 0-3   Unit(s)     Succeeding commands are applied to listed units',NEWLINE
  59.   dc.b '  a    All         Succeeding commands are applied to all TD units',NEWLINE
  60.   dc.b '  !    Warning     Suppress error if the following unit does not exist',NEWLINE
  61.   dc.b 'Commands:',NEWLINE
  62.   dc.b '<none> TD in RAM   No special functions (.=default), improved reliability',NEWLINE
  63.   dc.b '  o    Original    Let TD execute in its original ROM code',NEWLINE
  64.   dc.b '  s    SectorDisk  Let Trackdisk only give errors from bad sectors',NEWLINE
  65.   dc.b '  t   .TrackDisk   Normal: Let TD give errors from bad tracks',NEWLINE
  66.   dc.b '  n    NoClick     Perform noclick on the unit(s)',NEWLINE
  67.   dc.b '  c   .Click       Normal: No noclick',NEWLINE
  68.   dc.b '  r    ReadOnly    Make unit read-only, simulate open disk-tab',NEWLINE
  69.   dc.b '  w   .WriteEnable Normal: Unit is read/write according to disk-tab',NEWLINE
  70.   dc.b '  v    Verify      Read written track back and compare (vv, vvv)',NEWLINE
  71.   dc.b '  b   .Believe     Normal: Asume track is written well',NEWLINE
  72.   dc.b '  u    Update      Update track and stop motor after 5 sec idling',NEWLINE
  73.   dc.b '  e   .ExtUpdate   Normal: External update and motor off',NEWLINE
  74.   dc.b '  /    Separator   E.g. "0/2n"  Units 0 and 2 in RAM, noclick only on 2',NEWLINE
  75.   dc.b ' h ?   Explain     If given (anywhere), no commands are executed',NEWLINE
  76.   dc.b 0
  77.  
  78.  
  79.         END
  80.  
  81.  
  82.